<!--
* description: 整车销售---订单管理---订单详情
* author:xlc
* createdDate: 2020-11-17
-->
<template>
  <div class="app-container app-container-table">
    <el-dialog
      v-dialogDrag
      :visible="detpopupsVisible"
      :title="titleName"
      center
      width="90%"
      :append-to-body="true"
      :close-on-click-modal="false"
      @close="closeEdit"
    >
      <dialogHeader slot="title" :title="titleName" :style-type="$store.state.app.dialogType" />
      <el-row>
        <el-col :span="21">
          <div style="margin:15px">
            <div class="filter-container filter-params">
              <!-- 表单组件 -->
              <h3 id="id1" class="filter-container filter-title">订单信息</h3>
              <mix-form
                ref="multipleForm1"
                :dynamic-form-fields="dynamicFormFields1"
                :dynamic-fields-data="dynamicFieldsData"
              />
              <h3 id="id2" class="filter-container filter-title">车辆信息</h3>
              <mix-form
                ref="multipleForm2"
                :dynamic-form-fields="dynamicFormFields2"
                :dynamic-fields-data="dynamicFieldsData"
              />
              <!-- <div>
                <h3 id="id3" class="filter-container filter-title">订单金额</h3>
                <el-row>
                  <el-col :span="22">
                    <table id="printJS-table" :key="tableKey" border="1px solid #000" width="100%" style="margin: auto;text-align:center">
                      <tr>
                        <td rowspan="5" style="width: 300px;">整车价格信息</td>
                        <td style="width: 400px;">车型销售价格</td>
                        <td colspan="3">{{ dynamicFieldsData.carTypePrice }}</td>
                      </tr>
                      <tr>
                        <td>选装包</td>
                        <td colspan="3">{{ dynamicFieldsData.optionalPrice }}</td>
                      </tr>
                      <tr>
                        <td>车身颜色</td>
                        <td colspan="3">{{ dynamicFieldsData.carColorPrice }}</td>
                      </tr>
                      <tr>
                        <td>内饰颜色</td>
                        <td colspan="3">{{ dynamicFieldsData.carIncolorPrice }}</td>
                      </tr>
                      <tr>
                        <td>整车费用合计</td>
                        <td colspan="3">{{ dynamicFieldsData.carPrice }}</td>
                      </tr>
                      <tr>
                        <td rowspan="3">抵扣信息</td>
                        <td>优惠券</td>
                        <td>{{ dynamicFieldsData.couponAmount }}</td>
                        <td>备注</td>
                        <td>{{ dynamicFieldsData.yhRemark }}</td>
                      </tr>
                      <tr>
                        <td>翻倍</td>
                        <td>{{ dynamicFieldsData.couponDouble }}</td>
                        <td>备注</td>
                        <td>{{ dynamicFieldsData.fbRemark }}</td>
                      </tr>
                      <tr>
                        <td>抵扣合计</td>
                        <td colspan="3">{{ dynamicFieldsData.dkPrice }}</td>
                      </tr>
                      <tr>
                        <td colspan="2">整车开票金额</td>
                        <td colspan="3">{{ dynamicFieldsData.zckpPrice }}</td>
                      </tr>
                      <tr>
                        <td colspan="2">定金</td>
                        <td colspan="3">{{ dynamicFieldsData.receivedDespoist }}</td>
                      </tr>
                      <tr>
                        <td colspan="2">整车尾款</td>
                        <td colspan="3">{{ dynamicFieldsData.zcwkPrice }}</td>
                      </tr>
                    </table>
                  </el-col>
                </el-row>
              </div> -->
              <div>
                <div style="text-align:left">
                  <span id="id4" class="filter-container filter-title">合同签署人信息(车主)</span>
                  <!-- <el-button style="float:right;margin-right:1rem" @click="printTest('printJS-form')">打印合同单</el-button> -->
                </div>
                <div id="printJS-form">
                  <div id="zjimg">
                    <mix-form
                      ref="multipleForm3"
                      :dynamic-form-fields="dynamicFormFields3"
                      :dynamic-fields-data="dynamicFieldsData"
                    />
                  </div>
                </div>
              </div>
              <div>
                <h3 id="id5" class="filter-container filter-title">联系人信息</h3>
                <mix-form
                  ref="multipleForm4"
                  :dynamic-form-fields="dynamicFormFields4"
                  :dynamic-fields-data="dynamicFieldsData"
                />
              </div>

            </div>
            <h3 id="id6" class="filter-container filter-title">活动及权益</h3>
            <one-table-template
              ref="multipleTable7"
              :dynamic-api-config="apiConfig"
              :dynamic-table-cols="tableCols7"
              :dynamic-is-show-select="false"
              :dynamic-is-show-more-btn="true"
              :dynamic-table-defult-height="180"
              :is-show-pagination="false"
              :callback-obj="callbackObj"
            />
            <h3 id="id7" class="filter-container filter-title">订单收款流水</h3>
            <one-table-template
              ref="multipleTable8"
              :dynamic-api-config="apiConfig"
              :dynamic-table-cols="tableCols8"
              :dynamic-is-show-select="false"
              :dynamic-is-show-more-btn="true"
              :dynamic-table-defult-height="180"
              :is-show-pagination="false"
              :callback-obj="callbackObj"
            />
          </div>
        </el-col>
        <el-col :span="3" class="maodian" style="min-width:140px">
          <div><a href="#id1" class="filter-container filter-title">订单信息</a></div>
          <div><a href="#id2" class="filter-container filter-title">车辆信息</a></div>
          <!-- <div><a href="#id3" class="filter-container filter-title">订单金额</a></div> -->
          <div><a href="#id4" class="filter-container filter-title">合同签署人信息</a></div>
          <div><a href="#id5" class="filter-container filter-title">联系人信息</a></div>
          <div><a href="#id6" class="filter-container filter-title">活动权益</a></div>
          <div><a href="#id7" class="filter-container filter-title">订单收款流水</a></div>
        </el-col>
      </el-row>
    </el-dialog>
  </div>
</template>
<script>
import { oneTableWithViewTemplateMixins } from '@/components/mixins/oneTableWithViewTemplateMixins'
import { orgApis } from '@/api/vesalesapi.js'
import OneTableTemplate from '@/components/templates/oneTable'
import mixForm from '@/components/basicComponent/mixForm'
import dialogHeader from '@/components/dialogHeader'
import Vue from 'vue'
import printJS from 'print-js'
export default {
  name: 'OrderManagementdetail',
  components: {
    OneTableTemplate,
    dialogHeader,
    mixForm
  },
  mixins: [oneTableWithViewTemplateMixins],
  // 阻塞路由预加载网格中组件的数据
  beforeRouteEnter(to, from, next) {
    Vue.prototype.$ConfigCache.CacheConfig.initData([to.path, 'supplierMessage-edit'], () => {
      next()
    })
  },
  props: {
    detpopupsVisible: {
      type: Boolean,
      default: false
    },
    dataForForm: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    // 页面标识（与上面beforeRouteEnter中的对应）
    const viewPageCode = this.$route.path
    // 绑定事件配置化事件
    this.$ConfigCache.CacheConfig.bindEvent(this, [viewPageCode])
    return {
      titleName: '订单详情',
      // itemName: ['订单信息', '车辆信息', '订单金额', '合同签署人信息', '联系人信息', '活动权益', '订单收款流水'],
      // 网格查询API配置对象
      apiConfig: orgApis.detailsquery1,
      // 表单
      dynamicFormFields1: [
        {
          compKey: 'compKey1',
          label: 'DMS订单编号：',
          clearable: false,
          disabled: true,
          codeField: 'saleOrderCode',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey2',
          label: 'C端订单编号：',
          clearable: false,
          disabled: true,
          codeField: 'saleOrderCodeC',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey3',
          label: '订单状态：',
          clearable: false,
          disabled: true,
          codeField: 'orderStatusName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey4',
          label: '订单来源：',
          clearable: false,
          disabled: true,
          codeField: 'saleChannelsName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey5',
          label: '订单标签：',
          clearable: false,
          disabled: true,
          codeField: 'saleOrderSign',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey6',
          label: '已收金额：',
          clearable: false,
          disabled: true,
          codeField: 'receivedAmount',
          textField: '',
          isComponent: true,
          component: () => import('@/components/org/commonInput/numberInput.vue'),
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey7',
          label: '整车金额：',
          clearable: false,
          disabled: true,
          codeField: 'advicePrice',
          textField: '',
          isComponent: true,
          component: () => import('@/components/org/commonInput/numberInput.vue'),
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey8',
          label: '销售计划号：',
          clearable: false,
          disabled: true,
          codeField: 'salePlanCode',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey9',
          label: 'VIN码：',
          clearable: false,
          disabled: true,
          codeField: 'VIN',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey11',
          label: '客户姓名：',
          clearable: false,
          disabled: true,
          codeField: 'custName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey12',
          label: '客户电话：',
          clearable: false,
          disabled: true,
          codeField: 'custTel',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey13',
          label: '证件类型：',
          clearable: false,
          disabled: true,
          codeField: 'credTypeName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey14',
          label: '证件号码：',
          clearable: false,
          disabled: true,
          codeField: 'custCardNo',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey15',
          label: '联系人姓名：',
          clearable: false,
          disabled: true,
          codeField: 'custLxName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey16',
          label: '联系人电话：',
          clearable: false,
          disabled: true,
          codeField: 'custLxPhone',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey17',
          label: '购买方式：',
          clearable: false,
          disabled: true,
          codeField: 'buyTypeName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey18',
          label: '购车用途：',
          clearable: false,
          disabled: true,
          codeField: 'buyUserName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey19',
          label: '购买形态：',
          clearable: false,
          disabled: true,
          codeField: 'buyModleName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey20',
          label: '下单日期：',
          disabled: true,
          clearable: false,
          codeField: 'reserveDate',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey21',
          label: '销售人员：',
          clearable: false,
          disabled: true,
          codeField: 'caEmpName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey22',
          label: '销售人员电话：',
          clearable: false,
          disabled: true,
          codeField: 'caEmpPhone',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey23',
          label: '预计交付日期：',
          clearable: false,
          disabled: true,
          codeField: 'crmPreDeliverDate',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey25',
          label: '交付门店：',
          clearable: false,
          disabled: true,
          codeField: 'dlrShortName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey26',
          label: '门店类别：',
          clearable: false,
          disabled: true,
          codeField: 'dlrName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey27',
          label: '交付专员：',
          clearable: false,
          disabled: true,
          codeField: 'empName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey28',
          label: '车辆发运日期：',
          clearable: false,
          disabled: true,
          codeField: 'sendPersionDate',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey29',
          label: '实际交付日期：',
          clearable: false,
          disabled: true,
          codeField: 'deliveryDate',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey30',
          label: '新车PDI状态：',
          clearable: false,
          disabled: true,
          codeField: 'PDIFlag',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey31',
          label: '新车PDI时间：',
          clearable: false,
          disabled: true,
          codeField: 'PDIDate',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey33',
          label: '备注：',
          clearable: false,
          disabled: true,
          codeField: 'remark',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 12,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        }
      ],
      dynamicFormFields2: [
        {
          compKey: 'compKey1',
          label: '品牌：',
          clearable: false,
          disabled: true,
          codeField: 'carBrandCode',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey2',
          label: '车系编码：',
          clearable: false,
          disabled: true,
          codeField: 'carSeriesCode',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey3',
          label: '车系名称：',
          clearable: false,
          disabled: true,
          codeField: 'carSeriesCN',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey4',
          label: '基础车型编码：',
          clearable: false,
          disabled: true,
          codeField: 'carConfigCode',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey5',
          label: '基础车型名称：',
          clearable: false,
          disabled: true,
          codeField: 'carConfigCN',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey6',
          label: '选装包编码：',
          clearable: false,
          disabled: true,
          codeField: 'optionalPagCode',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey7',
          label: '选装包名称：',
          clearable: false,
          disabled: true,
          codeField: 'optionalPagName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey8',
          label: '车身颜色编码：',
          clearable: false,
          disabled: true,
          codeField: 'carColorCode',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey9',
          label: '车身颜色：',
          clearable: false,
          disabled: true,
          codeField: 'carColorName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey22',
          label: '内饰颜色编码：',
          clearable: false,
          disabled: true,
          codeField: 'carIncolorCode',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey23',
          label: '内饰颜色名称：',
          clearable: false,
          disabled: true,
          codeField: 'carIncolorName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey11',
          label: 'VIN码：',
          clearable: false,
          disabled: true,
          codeField: 'VIN',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey14',
          label: '电池型号：',
          clearable: false,
          disabled: true,
          codeField: 'batteryNumber',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey17',
          label: '下线日期：',
          clearable: false,
          disabled: true,
          codeField: 'offlineDate',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey18',
          label: '制造日期：',
          clearable: false,
          disabled: true,
          codeField: 'produce',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey19',
          label: '车辆限制类型：',
          clearable: false,
          disabled: true,
          codeField: 'hostLimitState',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey21',
          label: '订单配车时间：',
          clearable: false,
          disabled: true,
          codeField: 'assignDate',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        }
      ],
      dynamicFormFields3: [
        {
          compKey: 'compKey1',
          label: '合同编号：',
          clearable: false,
          disabled: true,
          codeField: 'saleContractCode',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey2',
          label: '合同日期：',
          clearable: false,
          disabled: true,
          codeField: 'saleContractDate',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey3',
          label: '客户类型：',
          clearable: false,
          disabled: true,
          codeField: 'signatoryType',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey5',
          label: '车主姓名：',
          clearable: false,
          disabled: true,
          codeField: 'signatoryName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey6',
          label: '车主电话：',
          clearable: false,
          disabled: true,
          codeField: 'signatoryPhone',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey8',
          label: '证件类型：',
          clearable: false,
          disabled: true,
          codeField: 'credTypeName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey9',
          label: '证件号码：',
          clearable: false,
          disabled: true,
          codeField: 'signatoryIDCard',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey7',
          label: '企业名称：',
          clearable: false,
          disabled: true,
          codeField: 'signatoryCompany',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey4',
          label: '社会信用代码：',
          clearable: false,
          disabled: true,
          codeField: 'signatoryCompanyCode',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        }],
      dynamicFormFields4: [
        {
          compKey: 'compKey1',
          label: '联系人姓名：',
          clearable: false,
          disabled: true,
          codeField: 'custLxName',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey2',
          label: '联系人性别：',
          clearable: false,
          disabled: true,
          codeField: 'custLxGender',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        },
        {
          compKey: 'compKey3',
          label: '联系人电话：',
          clearable: false,
          disabled: true,
          codeField: 'custLxPhone',
          isComponent: true,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true,
          span: 6,
          sendCode: () => { },
          focusCode: () => { },
          changeCode: (val) => {

          }
        }],
      // 动态生成网格列
      tableCols7:
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path] &&
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path].tableCols &&
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path].tableCols
          .length > 0
          ? this.$ConfigCache.CacheConfig.cacheData[this.$route.path].tableCols
          : [
            {
              prop: 'activesType',
              label: '权益大类', width: 120
            },
            {
              prop: 'deductionType',
              label: '抵扣类型', width: 120
            },
            {
              prop: 'isChecked',
              label: '添加方式', width: 120
            },
            {
              prop: 'legalRightName',
              label: '权益名称', width: 120
            },
            {
              prop: 'legalRightDescribe',
              label: '权益描述', width: 120
            },
            {
              prop: 'legalRightNumber',
              label: '权益值', width: 120
            },
            {
              prop: 'legalRightKind',
              label: '权益分类', width: 120
            },
            {
              prop: 'activitydetail',
              label: '活动描述', width: 120
            },
            {
              prop: 'activeBeginTime',
              label: '活动开始时间', width: 120
            },
            {
              prop: 'activeBeginTime',
              label: '活动结束时间', width: 120
            }
          ],
      tableCols8:
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path] &&
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path].tableCols &&
        this.$ConfigCache.CacheConfig.cacheData[this.$route.path].tableCols
          .length > 0
          ? this.$ConfigCache.CacheConfig.cacheData[this.$route.path].tableCols
          : [
            {
              prop: 'gatheringItemName',
              label: '收款项目', width: 120
            },
            {
              prop: 'gatheringAmount',
              label: '整车金额', width: 120
            },
            {
              prop: 'faceRecervedAmount',
              label: '实收金额', width: 120
            },
            {
              prop: 'receivedAmount',
              label: '已收总金额', width: 120
            },
            {
              prop: 'payTypeName',
              label: '收款方式', width: 120
            },
            {
              prop: 'gateringDate',
              label: '收款时间', width: 180
            },
            {
              prop: 'gatesArrivalDate',
              label: '到账时间', width: 180
            },
            {
              prop: 'payFlowNo',
              label: '流水号', width: 180
            },
            {
              prop: 'bankName',
              label: '付款银行', width: 180
            },
            {
              prop: 'bankAccount',
              label: '付款银行账号', width: 180
            },
            {
              prop: 'payer',
              label: '付款人姓名'
            }
          ],
      dynamicFieldsData: {},
      tableKey: '',
      // 单表格模版页面组件回调事件
      callbackObj: {

      }
    }
  },
  mounted() {
    this.$nextTick(() => {
      this.queryTableaaa()
    })
  },
  methods: {
    printTest(id) {
      printJS({ printable: id, type: 'html', targetStyles: ['*'] })
    },
    // 详情查询
    queryTableaaa() {
      this.$refs['multipleTable7'].listLoading = true
      this.$refs['multipleTable8'].listLoading = true
      // 'ID1008611'测试用=================================！！！
      var queryid = { saleOrderId: this.dataForForm.saleOrderId }
      // // 先读取参数中的传输对象
      const returnObj = {
      // api配置
        apiConfig: orgApis.orderdetailquery,
        // 条件/实体参数（变量），根据typeParam中的定义配置
        variables: queryid
      }
      // 转换了中台请求格式数据
      var paramD = this.$getParams(returnObj, null, this.dynamicApiStyle)
      // 调用中台API方法（可复用）
      this.$requestAPI(paramD, this.dynamicApiStyle).then(response => {
        if (response.result === '0') {
          this.$refs['multipleTable7'].listLoading = false
          this.$refs['multipleTable8'].listLoading = false
          if (response.msg) {
            this.$message({
              message: response.msg,
              type: 'warn',
              uration: 2000
            })
          }
          return
        }
        var obj = response.rows[0].orderDetails
        for (var item in obj) {
          // console.log(typeof (obj[item]))
          if (typeof (obj[item]) === 'number') {
            obj[item] = `${obj[item]}`
          }
        }
        // 返回json
        Object.assign(this.dynamicFieldsData, obj, response.rows[0].linkManDetails)
        this.tableKey += 1
        var arr1 = response.rows[0].activeDetails
        var arr2 = response.rows[0].orderCollectionDetails
        for (var i = 0; i < arr1; i++) {
          if (!arr1[i].index) {
            arr1[i].index = i
          }
        }
        for (let i = 0; i < arr2; i++) {
          if (!arr2[i].index) {
            arr2[i].index = i
          }
        }
        this.$refs['multipleTable7'].list = arr1
        this.$refs['multipleTable8'].list = arr2
        this.$refs['multipleTable7'].listLoading = false
        this.$refs['multipleTable8'].listLoading = false
      }).catch(err => {
        console.info(err)
        this.$refs['multipleTable7'].listLoading = false
        this.$refs['multipleTable8'].listLoading = false
      })
    },
    // 关闭
    closeEdit(type) {
      this.$emit('closedet', type)
    }
  }
}
</script>
<style lang='scss' scoped>
input{
  padding-right: 0 !important
}
.maodian{
  position: fixed;
  right:8rem
}
  el-dialog{
    padding:15px 15px 40px 15px
  }
  img{
    width:10rem
  }
</style>

